<?php
http_response_code(404);
    include "./mysql.php";
    $user_id = $_GET["user_id"];
    $sql = "select * from shopcar where user_id='${user_id}' order by id desc";
    $result = $mysqli->query($sql);
    $res = $mysqli->query($sql);
     while($row = $res->fetch_assoc()){
         $articles[] = $row;
     }
      print_r(json_encode($articles));